package com.farecrawler.junit;

import junit.framework.TestSuite;
import junit.textui.TestRunner;

import com.farecrawler.app.airlines.TestAirlinesUtils;
import com.farecrawler.app.model.TestFlightRequest;
import com.farecrawler.app.net.TestTigerConnection;
import com.farecrawler.app.utils.TestDateUtils;
import com.farecrawler.app.utils.TestEmailUtils;
import com.farecrawler.app.utils.TestStringUtils;

public class FareCrawlTestSuite{
	
	private TestSuite suite;
	
	public FareCrawlTestSuite(){
		suite = new TestSuite();
		bootstrapTests();
	}
	
	private void bootstrapTests(){
		addUtilsTest();
		addTigerAirwaysTest();
	}
	
	private void addUtilsTest(){
		suite.addTestSuite(TestAirlinesUtils.class);
		suite.addTestSuite(TestDateUtils.class);
		suite.addTestSuite(TestEmailUtils.class);
		suite.addTestSuite(TestStringUtils.class);
	}
	
	private void addTigerAirwaysTest(){
//		suite.addTestSuite(TestFareCrawlerJob.class);
//		suite.addTestSuite(TestTigerAirJob.class);
		suite.addTestSuite(TestFlightRequest.class);
		suite.addTestSuite(TestTigerConnection.class);
	}
	
	public TestSuite getSuite() {
		return suite;
	}
	
	public static void main(String[] a) {
		TestSuite testSuite = new FareCrawlTestSuite().getSuite(); 
		TestRunner.run(testSuite);
	}
}
